// source --> http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/jquery.infinitescroll.js /*jshint undef: true */ /*global jQuery: true */ /* -------------------------------- Infinite Scroll -------------------------------- + https://github.com/paulirish/infinite-scroll + version 2.0b2.120519 + Copyright 2011/12 Paul Irish & Luke Shumard + Licensed under the MIT license + Documentation: http://infinite-scroll.com/ */ (function (window, $, undefined) { "use strict"; $.infinitescroll = function infscr(options, callback, element) { this.element = $(element); // Flag the object in the event of a failed creation if (!this._create(options, callback)) { this.failed = true; } }; $.infinitescroll.defaults = { loading: { finished: undefined, finishedMsg: "Congratulations, you've reached the end of the internet.", img: "data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYM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OAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7", msg: null, msgText: "Loading the next set of posts...", selector: null, speed: 'fast', start: undefined }, state: { isDuringAjax: false, isInvalidPage: false, isDestroyed: false, isDone: false, // For when it goes all the way through the archive. isPaused: false, isBeyondMaxPage: false, currPage: 1 }, debug: false, behavior: undefined, binder: $(window), // used to cache the selector nextSelector: "div.navigation a:first", navSelector: "div.navigation", contentSelector: null, // rename to pageFragment extraScrollPx: 150, itemSelector: "div.post", animate: false, pathParse: undefined, dataType: 'html', appendCallback: true, bufferPx: 40, errorCallback: function () { }, infid: 0, //Instance ID pixelsFromNavToBottom: undefined, path: undefined, // Either parts of a URL as an array (e.g. ["/page/", "/"] or a function that takes in the page number and returns a URL prefill: false, // When the document is smaller than the window, load data until the document is larger or links are exhausted maxPage: undefined // to manually control maximum page (when maxPage is undefined, maximum page limitation is not work) }; $.infinitescroll.prototype = { /* ---------------------------- Private methods ---------------------------- */ // Bind or unbind from scroll _binding: function infscr_binding(binding) { var instance = this, opts = instance.options; opts.v = '2.0b2.120520'; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_binding_'+opts.behavior] !== undefined) { this['_binding_'+opts.behavior].call(this); return; } if (binding !== 'bind' && binding !== 'unbind') { this._debug('Binding value ' + binding + ' not valid'); return false; } if (binding === 'unbind') { (this.options.binder).unbind('smartscroll.infscr.' + instance.options.infid); } else { (this.options.binder)[binding]('smartscroll.infscr.' + instance.options.infid, function () { instance.scroll(); }); } this._debug('Binding', binding); }, // Fundamental aspects of the plugin are initialized _create: function infscr_create(options, callback) { // Add custom options to defaults var opts = $.extend(true, {}, $.infinitescroll.defaults, options); this.options = opts; var $window = $(window); var instance = this; // Validate selectors if (!instance._validate(options)) { return false; } // Validate page fragment path var path = $(opts.nextSelector).attr('href'); if (!path) { this._debug('Navigation selector not found'); return false; } // Set the path to be a relative URL from root. opts.path = opts.path || this._determinepath(path); // contentSelector is 'page fragment' option for .load() / .ajax() calls opts.contentSelector = opts.contentSelector || this.element; // loading.selector - if we want to place the load message in a specific selector, defaulted to the contentSelector opts.loading.selector = opts.loading.selector || opts.contentSelector; // Define loading.msg opts.loading.msg = opts.loading.msg || $('
Loading...
' + opts.loading.msgText + '
'); // Preload loading.img (new Image()).src = opts.loading.img; // distance from nav links to bottom // computed as: height of the document + top offset of container - top offset of nav link if(opts.pixelsFromNavToBottom === undefined) { opts.pixelsFromNavToBottom = $(document).height() - $(opts.navSelector).offset().top; this._debug("pixelsFromNavToBottom: " + opts.pixelsFromNavToBottom); } var self = this; // determine loading.start actions opts.loading.start = opts.loading.start || function() { $(opts.navSelector).hide(); opts.loading.msg .appendTo(opts.loading.selector) .show(opts.loading.speed, $.proxy(function() { this.beginAjax(opts); }, self)); }; // determine loading.finished actions opts.loading.finished = opts.loading.finished || function() { if (!opts.state.isBeyondMaxPage) opts.loading.msg.fadeOut(opts.loading.speed); }; // callback loading opts.callback = function(instance, data, url) { if (!!opts.behavior && instance['_callback_'+opts.behavior] !== undefined) { instance['_callback_'+opts.behavior].call($(opts.contentSelector)[0], data, url); } if (callback) { callback.call($(opts.contentSelector)[0], data, opts, url); } if (opts.prefill) { $window.bind("resize.infinite-scroll", instance._prefill); } }; if (options.debug) { // Tell IE9 to use its built-in console if (Function.prototype.bind && (typeof console === 'object' || typeof console === 'function') && typeof console.log === "object") { ["log","info","warn","error","assert","dir","clear","profile","profileEnd"] .forEach(function (method) { console[method] = this.call(console[method], console); }, Function.prototype.bind); } } this._setup(); // Setups the prefill method for use if (opts.prefill) { this._prefill(); } // Return true to indicate successful creation return true; }, _prefill: function infscr_prefill() { var instance = this; var $window = $(window); function needsPrefill() { return (instance.options.contentSelector.height() <= $window.height()); } this._prefill = function() { if (needsPrefill()) { instance.scroll(); } $window.bind("resize.infinite-scroll", function() { if (needsPrefill()) { $window.unbind("resize.infinite-scroll"); instance.scroll(); } }); }; // Call self after setting up the new function this._prefill(); }, // Console log wrapper _debug: function infscr_debug() { if (true !== this.options.debug) { return; } if (typeof console !== 'undefined' && typeof console.log === 'function') { // Modern browsers // Single argument, which is a string if ((Array.prototype.slice.call(arguments)).length === 1 && typeof Array.prototype.slice.call(arguments)[0] === 'string') { console.log( (Array.prototype.slice.call(arguments)).toString() ); } else { console.log( Array.prototype.slice.call(arguments) ); } } else if (!Function.prototype.bind && typeof console !== 'undefined' && typeof console.log === 'object') { // IE8 Function.prototype.call.call(console.log, console, Array.prototype.slice.call(arguments)); } }, // find the number to increment in the path. _determinepath: function infscr_determinepath(path) { var opts = this.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_determinepath_'+opts.behavior] !== undefined) { return this['_determinepath_'+opts.behavior].call(this,path); } if (!!opts.pathParse) { this._debug('pathParse manual'); return opts.pathParse(path, this.options.state.currPage+1); } else if (path.match(/^(.*?)\b2\b(.*?$)/)) { path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1); // if there is any 2 in the url at all. } else if (path.match(/^(.*?)2(.*?$)/)) { // page= is used in django: // http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127 if (path.match(/^(.*?page=)2(\/.*|$)/)) { path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1); return path; } path = path.match(/^(.*?)2(.*?$)/).slice(1); } else { // page= is used in drupal too but second page is page=1 not page=2: // thx Jerod Fritz, vladikoff if (path.match(/^(.*?page=)1(\/.*|$)/)) { path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1); return path; } else { this._debug('Sorry, we couldn\'t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.'); // Get rid of isInvalidPage to allow permalink to state opts.state.isInvalidPage = true; //prevent it from running on this page. } } this._debug('determinePath', path); return path; }, // Custom error _error: function infscr_error(xhr) { var opts = this.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_error_'+opts.behavior] !== undefined) { this['_error_'+opts.behavior].call(this,xhr); return; } if (xhr !== 'destroy' && xhr !== 'end') { xhr = 'unknown'; } this._debug('Error', xhr); if (xhr === 'end' || opts.state.isBeyondMaxPage) { this._showdonemsg(); } opts.state.isDone = true; opts.state.currPage = 1; // if you need to go back to this instance opts.state.isPaused = false; opts.state.isBeyondMaxPage = false; this._binding('unbind'); }, // Load Callback _loadcallback: function infscr_loadcallback(box, data, url) { var opts = this.options, callback = this.options.callback, // GLOBAL OBJECT FOR CALLBACK result = (opts.state.isDone) ? 'done' : (!opts.appendCallback) ? 'no-append' : 'append', frag; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_loadcallback_'+opts.behavior] !== undefined) { this['_loadcallback_'+opts.behavior].call(this,box,data); return; } switch (result) { case 'done': this._showdonemsg(); return false; case 'no-append': if (opts.dataType === 'html') { data = '
' + data + '
'; data = $(data).find(opts.itemSelector); } break; case 'append': var children = box.children(); // if it didn't return anything if (children.length === 0) { return this._error('end'); } // use a documentFragment because it works when content is going into a table or UL frag = document.createDocumentFragment(); while (box[0].firstChild) { frag.appendChild(box[0].firstChild); } this._debug('contentSelector', $(opts.contentSelector)[0]); $(opts.contentSelector)[0].appendChild(frag); // previously, we would pass in the new DOM element as context for the callback // however we're now using a documentfragment, which doesn't have parents or children, // so the context is the contentContainer guy, and we pass in an array // of the elements collected as the first argument. data = children.get(); break; } // loadingEnd function opts.loading.finished.call($(opts.contentSelector)[0],opts); // smooth scroll to ease in the new content if (opts.animate) { var scrollTo = $(window).scrollTop() + $(opts.loading.msg).height() + opts.extraScrollPx + 'px'; $('html,body').animate({ scrollTop: scrollTo }, 800, function () { opts.state.isDuringAjax = false; }); } if (!opts.animate) { // once the call is done, we can allow it again. opts.state.isDuringAjax = false; } callback(this, data, url); if (opts.prefill) { this._prefill(); } }, _nearbottom: function infscr_nearbottom() { var opts = this.options, pixelsFromWindowBottomToBottom = 0 + $(document).height() - (opts.binder.scrollTop()) - $(window).height(); // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_nearbottom_'+opts.behavior] !== undefined) { return this['_nearbottom_'+opts.behavior].call(this); } this._debug('math:', pixelsFromWindowBottomToBottom, opts.pixelsFromNavToBottom); // if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom.... return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.pixelsFromNavToBottom); }, // Pause / temporarily disable plugin from firing _pausing: function infscr_pausing(pause) { var opts = this.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_pausing_'+opts.behavior] !== undefined) { this['_pausing_'+opts.behavior].call(this,pause); return; } // If pause is not 'pause' or 'resume', toggle it's value if (pause !== 'pause' && pause !== 'resume' && pause !== null) { this._debug('Invalid argument. Toggling pause value instead'); } pause = (pause && (pause === 'pause' || pause === 'resume')) ? pause : 'toggle'; switch (pause) { case 'pause': opts.state.isPaused = true; break; case 'resume': opts.state.isPaused = false; break; case 'toggle': opts.state.isPaused = !opts.state.isPaused; break; } this._debug('Paused', opts.state.isPaused); return false; }, // Behavior is determined // If the behavior option is undefined, it will set to default and bind to scroll _setup: function infscr_setup() { var opts = this.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_setup_'+opts.behavior] !== undefined) { this['_setup_'+opts.behavior].call(this); return; } this._binding('bind'); return false; }, // Show done message _showdonemsg: function infscr_showdonemsg() { var opts = this.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['_showdonemsg_'+opts.behavior] !== undefined) { this['_showdonemsg_'+opts.behavior].call(this); return; } opts.loading.msg .find('img') .hide() .parent() .find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () { $(this).parent().fadeOut(opts.loading.speed); }); // user provided callback when done opts.errorCallback.call($(opts.contentSelector)[0],'done'); }, // grab each selector option and see if any fail _validate: function infscr_validate(opts) { for (var key in opts) { if (key.indexOf && key.indexOf('Selector') > -1 && $(opts[key]).length === 0) { this._debug('Your ' + key + ' found no elements.'); return false; } } return true; }, /* ---------------------------- Public methods ---------------------------- */ // Bind to scroll bind: function infscr_bind() { this._binding('bind'); }, // Destroy current instance of plugin destroy: function infscr_destroy() { this.options.state.isDestroyed = true; this.options.loading.finished(); return this._error('destroy'); }, // Set pause value to false pause: function infscr_pause() { this._pausing('pause'); }, // Set pause value to false resume: function infscr_resume() { this._pausing('resume'); }, beginAjax: function infscr_ajax(opts) { var instance = this, path = opts.path, box, desturl, method, condition; // increment the URL bit. e.g. /page/3/ opts.state.currPage++; // Manually control maximum page if ( opts.maxPage != undefined && opts.state.currPage > opts.maxPage ){ opts.state.isBeyondMaxPage = true; this.destroy(); return; } // if we're dealing with a table we can't use DIVs box = $(opts.contentSelector).is('table, tbody') ? $('') : $('
'); desturl = (typeof path === 'function') ? path(opts.state.currPage) : path.join(opts.state.currPage); instance._debug('heading into ajax', desturl); method = (opts.dataType === 'html' || opts.dataType === 'json' ) ? opts.dataType : 'html+callback'; if (opts.appendCallback && opts.dataType === 'html') { method += '+callback'; } switch (method) { case 'html+callback': instance._debug('Using HTML via .load() method'); box.load(desturl + ' ' + opts.itemSelector, undefined, function infscr_ajax_callback(responseText) { instance._loadcallback(box, responseText, desturl); }); break; case 'html': instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method'); $.ajax({ // params url: desturl, dataType: opts.dataType, complete: function infscr_ajax_callback(jqXHR, textStatus) { condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified"); if (condition) { instance._loadcallback(box, jqXHR.responseText, desturl); } else { instance._error('end'); } } }); break; case 'json': instance._debug('Using ' + (method.toUpperCase()) + ' via $.ajax() method'); $.ajax({ dataType: 'json', type: 'GET', url: desturl, success: function (data, textStatus, jqXHR) { condition = (typeof (jqXHR.isResolved) !== 'undefined') ? (jqXHR.isResolved()) : (textStatus === "success" || textStatus === "notmodified"); if (opts.appendCallback) { // if appendCallback is true, you must defined template in options. // note that data passed into _loadcallback is already an html (after processed in opts.template(data)). if (opts.template !== undefined) { var theData = opts.template(data); // theData.replace('
','
'); box.append(theData); if (condition) { instance._loadcallback(box, theData); } else { instance._error('end'); } } else { instance._debug("template must be defined."); instance._error('end'); } } else { // if appendCallback is false, we will pass in the JSON object. you should handle it yourself in your callback. if (condition) { instance._loadcallback(box, data, desturl); } else { instance._error('end'); } } }, error: function() { instance._debug("JSON ajax request failed."); instance._error('end'); } }); break; } }, // Retrieve next set of content items retrieve: function infscr_retrieve(pageNum) { pageNum = pageNum || null; var instance = this, opts = instance.options; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['retrieve_'+opts.behavior] !== undefined) { this['retrieve_'+opts.behavior].call(this,pageNum); return; } // for manual triggers, if destroyed, get out of here if (opts.state.isDestroyed) { this._debug('Instance is destroyed'); return false; } // we dont want to fire the ajax multiple times opts.state.isDuringAjax = true; opts.loading.start.call($(opts.contentSelector)[0],opts); }, // Check to see next page is needed scroll: function infscr_scroll() { var opts = this.options, state = opts.state; // if behavior is defined and this function is extended, call that instead of default if (!!opts.behavior && this['scroll_'+opts.behavior] !== undefined) { this['scroll_'+opts.behavior].call(this); return; } if (state.isDuringAjax || state.isInvalidPage || state.isDone || state.isDestroyed || state.isPaused) { return; } if (!this._nearbottom()) { return; } this.retrieve(); }, // Toggle pause value toggle: function infscr_toggle() { this._pausing(); }, // Unbind from scroll unbind: function infscr_unbind() { this._binding('unbind'); }, // update options update: function infscr_options(key) { if ($.isPlainObject(key)) { this.options = $.extend(true,this.options,key); } } }; /* ---------------------------- Infinite Scroll function ---------------------------- Borrowed logic from the following... jQuery UI - https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js jCarousel - https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js Masonry - https://github.com/desandro/masonry/blob/master/jquery.masonry.js */ $.fn.infinitescroll = function infscr_init(options, callback) { var thisCall = typeof options; switch (thisCall) { // method case 'string': var args = Array.prototype.slice.call(arguments, 1); this.each(function () { var instance = $.data(this, 'infinitescroll'); if (!instance) { // not setup yet // return $.error('Method ' + options + ' cannot be called until Infinite Scroll is setup'); return false; } if (!$.isFunction(instance[options]) || options.charAt(0) === "_") { // return $.error('No such method ' + options + ' for Infinite Scroll'); return false; } // no errors! instance[options].apply(instance, args); }); break; // creation case 'object': this.each(function () { var instance = $.data(this, 'infinitescroll'); if (instance) { // update options of current instance instance.update(options); } else { // initialize new instance instance = new $.infinitescroll(options, callback, this); // don't attach if instantiation failed if (!instance.failed) { $.data(this, 'infinitescroll', instance); } } }); break; } return this; }; /* * smartscroll: debounced scroll event for jQuery * * https://github.com/lukeshumard/smartscroll * Based on smartresize by @louis_remi: https://github.com/lrbabe/jquery.smartresize.js * * Copyright 2011 Louis-Remi & Luke Shumard * Licensed under the MIT license. * */ var event = $.event, scrollTimeout; event.special.smartscroll = { setup: function () { $(this).bind("scroll", event.special.smartscroll.handler); }, teardown: function () { $(this).unbind("scroll", event.special.smartscroll.handler); }, handler: function (event, execAsap) { // Save the context var context = this, args = arguments; // set correct event type event.type = "smartscroll"; if (scrollTimeout) { clearTimeout(scrollTimeout); } scrollTimeout = setTimeout(function () { $(context).trigger('smartscroll', args); }, execAsap === "execAsap" ? 0 : 100); } }; $.fn.smartscroll = function (fn) { return fn ? this.bind("smartscroll", fn) : this.trigger("smartscroll", ["execAsap"]); }; })(window, jQuery); // source --> http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/jquery.slicknav.js /*! SlickNav Responsive Mobile Menu (c) 2013 Josh Cope licensed under GPL and MIT */ ;(function ($, document, window) { var // default settings object. defaults = { label: '', duplicate: true, duration: 200, easingOpen: 'swing', easingClose: 'swing', closedSymbol: '►', openedSymbol: '▼', prependTo: 'body', parentTag: 'a', closeOnClick: false, allowParentLinks: false, init: function(){}, open: function(){}, close: function(){} }, mobileMenu = 'slicknav', prefix = 'slicknav'; function Plugin( element, options ) { this.element = element; // jQuery has an extend method which merges the contents of two or // more objects, storing the result in the first object. The first object // is generally empty as we don't want to alter the default options for // future instances of the plugin this.settings = $.extend( {}, defaults, options) ; this._defaults = defaults; this._name = mobileMenu; this.init(); } Plugin.prototype.init = function () { var $this = this; var menu = $(this.element); var settings = this.settings; // clone menu if needed if (settings.duplicate) { $this.mobileNav = menu.clone(); //remove ids from clone to prevent css issues $this.mobileNav.removeAttr('id'); $this.mobileNav.find('*').each(function(i,e){ $(e).removeAttr('id'); }); } else $this.mobileNav = menu; // styling class for the button var iconClass = prefix+'_icon'; if (settings.label == '') { iconClass += ' '+prefix+'_no-text'; } if (settings.parentTag == 'a') { settings.parentTag = 'a href="#"'; } // create menu bar $this.mobileNav.attr('class', prefix+'_nav'); var menuBar = $('
'); $this.btn = $('<'+settings.parentTag+' aria-haspopup="true" tabindex="0" class="'+prefix+'_btn '+prefix+'_collapsed">'+settings.label+''); $(menuBar).append($this.btn); $(settings.prependTo).prepend(menuBar); menuBar.append($this.mobileNav); // iterate over structure adding additional structure var items = $this.mobileNav.find('li'); $(items).each(function () { var item = $(this); data = {}; data.children = item.children('ul').attr('role','menu'); item.data("menu", data); // if a list item has a nested menu if (data.children.length > 0) { // select all text before the child menu var a = item.contents(); var nodes = []; $(a).each(function(){ if(!$(this).is("ul")) { nodes.push(this); } else { return false; } }); // wrap item text with tag and add classes var wrap = $(nodes).wrapAll('<'+settings.parentTag+' role="menuitem" aria-haspopup="true" tabindex="-1" class="'+prefix+'_item"/>').parent(); item.addClass(prefix+'_collapsed'); item.addClass(prefix+'_parent'); // create parent arrow $(nodes).last().after(''+settings.closedSymbol+''); } else if ( item.children().length == 0) { item.addClass(prefix+'_txtnode'); } // accessibility for links item.children('a').attr('role', 'menuitem').click(function(){ //Emulate menu close if set if (settings.closeOnClick) $($this.btn).click(); }); }); // structure is in place, now hide appropriate items $(items).each(function () { var data = $(this).data("menu"); $this._visibilityToggle(data.children, false, null, true); }); // finally toggle entire menu $this._visibilityToggle($this.mobileNav, false, 'init', true); // accessibility for menu button $this.mobileNav.attr('role','menu'); // outline prevention when using mouse $(document).mousedown(function(){ $this._outlines(false); }); $(document).keyup(function(){ $this._outlines(true); }); // menu button click $($this.btn).click(function (e) { e.preventDefault(); $this._menuToggle(); }); // click on menu parent $this.mobileNav.on('click', '.'+prefix+'_item', function(e){ e.preventDefault(); $this._itemClick($(this)); }); // check for enter key on menu button and menu parents $($this.btn).keydown(function (e) { var ev = e || event; if(ev.keyCode == 13) { e.preventDefault(); $this._menuToggle(); } }); $this.mobileNav.on('keydown', '.'+prefix+'_item', function(e) { var ev = e || event; if(ev.keyCode == 13) { e.preventDefault(); $this._itemClick($(e.target)); } }); // allow links clickable within parent tags if set if (settings.allowParentLinks) { $('.'+prefix+'_item a').click(function(e){ e.stopImmediatePropagation(); }); } }; //toggle menu Plugin.prototype._menuToggle = function(el){ var $this = this; var btn = $this.btn; var mobileNav = $this.mobileNav; if (btn.hasClass(prefix+'_collapsed')) { btn.removeClass(prefix+'_collapsed'); btn.addClass(prefix+'_open'); } else { btn.removeClass(prefix+'_open'); btn.addClass(prefix+'_collapsed'); } btn.addClass(prefix+'_animating'); $this._visibilityToggle(mobileNav, true, btn); } // toggle clicked items Plugin.prototype._itemClick = function(el) { var $this = this; var settings = $this.settings; var data = el.data("menu"); if (!data) { data = {}; data.arrow = el.children('.'+prefix+'_arrow'); data.ul = el.next('ul'); data.parent = el.parent(); el.data("menu", data); } if (data.parent.hasClass(prefix+'_collapsed')) { data.arrow.html(settings.openedSymbol); data.parent.removeClass(prefix+'_collapsed'); data.parent.addClass(prefix+'_open'); data.parent.addClass(prefix+'_animating'); $this._visibilityToggle(data.ul, true, el); } else { data.arrow.html(settings.closedSymbol); data.parent.addClass(prefix+'_collapsed'); data.parent.removeClass(prefix+'_open'); data.parent.addClass(prefix+'_animating'); $this._visibilityToggle(data.ul, true, el); } } // toggle actual visibility and accessibility tags Plugin.prototype._visibilityToggle = function(el, animate, trigger, init) { var $this = this; var settings = $this.settings; var items = $this._getActionItems(el); var duration = 0; if (animate) duration = settings.duration; if (el.hasClass(prefix+'_hidden')) { el.removeClass(prefix+'_hidden'); el.slideDown(duration, settings.easingOpen, function(){ $(trigger).removeClass(prefix+'_animating'); $(trigger).parent().removeClass(prefix+'_animating'); //Fire open callback if (!init) { settings.open(trigger); } }); el.attr('aria-hidden','false'); items.attr('tabindex', '0'); $this._setVisAttr(el, false); } else { el.addClass(prefix+'_hidden'); el.slideUp(duration, this.settings.easingClose, function() { el.attr('aria-hidden','true'); items.attr('tabindex', '-1'); $this._setVisAttr(el, true); el.hide(); //jQuery 1.7 bug fix $(trigger).removeClass(prefix+'_animating'); $(trigger).parent().removeClass(prefix+'_animating'); //Fire init or close callback if (!init) settings.close(trigger); else if (trigger == 'init') settings.init(); }); } } // set attributes of element and children based on visibility Plugin.prototype._setVisAttr = function(el, hidden) { var $this = this; // select all parents that aren't hidden var nonHidden = el.children('li').children('ul').not('.'+prefix+'_hidden'); // iterate over all items setting appropriate tags if (!hidden) { nonHidden.each(function(){ var ul = $(this); ul.attr('aria-hidden','false'); var items = $this._getActionItems(ul); items.attr('tabindex', '0'); $this._setVisAttr(ul, hidden); }); } else { nonHidden.each(function(){ var ul = $(this); ul.attr('aria-hidden','true'); var items = $this._getActionItems(ul); items.attr('tabindex', '-1'); $this._setVisAttr(ul, hidden); }); } } // get all 1st level items that are clickable Plugin.prototype._getActionItems = function(el) { var data = el.data("menu"); if (!data) { data = {}; var items = el.children('li'); var anchors = items.children('a'); data.links = anchors.add(items.children('.'+prefix+'_item')); el.data("menu", data); } return data.links; } Plugin.prototype._outlines = function(state) { if (!state) { $('.'+prefix+'_item, .'+prefix+'_btn').css('outline','none'); } else { $('.'+prefix+'_item, .'+prefix+'_btn').css('outline',''); } } Plugin.prototype.toggle = function(){ $this._menuToggle(); } Plugin.prototype.open = function(){ $this = this; if ($this.btn.hasClass(prefix+'_collapsed')) { $this._menuToggle(); } } Plugin.prototype.close = function(){ $this = this; if ($this.btn.hasClass(prefix+'_open')) { $this._menuToggle(); } } $.fn[mobileMenu] = function ( options ) { var args = arguments; // Is the first parameter an object (options), or was omitted, instantiate a new instance if (options === undefined || typeof options === 'object') { return this.each(function () { // Only allow the plugin to be instantiated once due to methods if (!$.data(this, 'plugin_' + mobileMenu)) { // if it has no instance, create a new one, pass options to our plugin constructor, // and store the plugin instance in the elements jQuery data object. $.data(this, 'plugin_' + mobileMenu, new Plugin( this, options )); } }); // If is a string and doesn't start with an underscore or 'init' function, treat this as a call to a public method. } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') { // Cache the method call to make it possible to return a value var returns; this.each(function () { var instance = $.data(this, 'plugin_' + mobileMenu); // Tests that there's already a plugin-instance and checks that the requested public method exists if (instance instanceof Plugin && typeof instance[options] === 'function') { // Call the method of our plugin instance, and pass it the supplied arguments. returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) ); } }); // If the earlier cached method gives a value back return the value, otherwise return this to preserve chainability. return returns !== undefined ? returns : this; } }; }(jQuery, document, window)); // source --> http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/retina-1.1.0.min.js /*! * Retina.js v1.1.0 * * Copyright 2013 Imulus, LLC * Released under the MIT license * * Retina.js is an open source script that makes it easy to serve * high-resolution images to devices with retina displays. */ (function(){var root=typeof exports=="undefined"?window:exports;var config={check_mime_type:true};root.Retina=Retina;function Retina(){}Retina.configure=function(options){if(options==null)options={};for(var prop in options)config[prop]=options[prop]};Retina.init=function(context){if(context==null)context=root;var existing_onload=context.onload||new Function;context.onload=function(){var images=document.getElementsByTagName("img"),retinaImages=[],i,image;for(i=0;i1)return true;if(root.matchMedia&&root.matchMedia(mediaQuery).matches)return true;return false};root.RetinaImagePath=RetinaImagePath;function RetinaImagePath(path,at_2x_path){this.path=path;if(typeof at_2x_path!=="undefined"&&at_2x_path!==null){this.at_2x_path=at_2x_path;this.perform_check=false}else{this.at_2x_path=path.replace(/\.\w+$/,function(match){return"@2x"+match});this.perform_check=true}}RetinaImagePath.confirmed_paths=[];RetinaImagePath.prototype.is_external=function(){return!!(this.path.match(/^https?\:/i)&&!this.path.match("//"+document.domain))};RetinaImagePath.prototype.check_2x_variant=function(callback){var http,that=this;if(this.is_external()){return callback(false)}else if(!this.perform_check&&typeof this.at_2x_path!=="undefined"&&this.at_2x_path!==null){return callback(true)}else if(this.at_2x_path in RetinaImagePath.confirmed_paths){return callback(true)}else{http=new XMLHttpRequest;http.open("HEAD",this.at_2x_path);http.onreadystatechange=function(){if(http.readyState!=4){return callback(false)}if(http.status>=200&&http.status<=399){if(config.check_mime_type){var type=http.getResponseHeader("Content-Type");if(type==null||!type.match(/^image/i)){return callback(false)}}RetinaImagePath.confirmed_paths.push(that.at_2x_path);return callback(true)}else{return callback(false)}};http.send()}};function RetinaImage(el){this.el=el;this.path=new RetinaImagePath(this.el.getAttribute("src"),this.el.getAttribute("data-at2x"));var that=this;this.path.check_2x_variant(function(hasVariant){if(hasVariant)that.swap()})}root.RetinaImage=RetinaImage;RetinaImage.prototype.swap=function(path){if(typeof path=="undefined")path=this.path.at_2x_path;var that=this;function load(){if(!that.el.complete){setTimeout(load,5)}else{that.el.setAttribute("width",that.el.offsetWidth);that.el.setAttribute("height",that.el.offsetHeight);that.el.setAttribute("src",path)}}load()};if(Retina.isRetina()){Retina.init(root)}})(); // source --> http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/modernizr-custom-v2.7.1.min.js window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function e(a,b){return d(u.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a){var e=a[d];if(!g(e,"-")&&t[e]!==c)return"pfx"==b?e:!0}return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+w.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+x.join(d+" ")+d).split(" "),i(e,b,c))}var k,l,m,n="2.7.1",o={},p=!0,q=b.documentElement,r="modernizr",s=b.createElement(r),t=s.style,u=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),v="Webkit Moz O ms",w=v.split(" "),x=v.toLowerCase().split(" "),y={},z=[],A=z.slice,B=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:r+(d+1),j.appendChild(h);return f=["­",'"].join(""),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=q.style.overflow,q.style.overflow="hidden",q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},C=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var g=a in e;return g||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),g=f(e[a],"function"),f(e[a],"undefined")||(e[a]=c),e.removeAttribute(a))),e=null,g}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),D={}.hasOwnProperty;m=f(D,"undefined")||f(D.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return D.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=A.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(A.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(A.call(arguments)))};return d}),y.canvas=function(){var a=b.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))},y.canvastext=function(){return!(!o.canvas||!f(b.createElement("canvas").getContext("2d").fillText,"function"))},y.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:B(["@media (",u.join("touch-enabled),("),r,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},y.rgba=function(){return d("background-color:rgba(150,255,150,.5)"),g(t.backgroundColor,"rgba")},y.backgroundsize=function(){return j("backgroundSize")},y.borderimage=function(){return j("borderImage")},y.borderradius=function(){return j("borderRadius")},y.boxshadow=function(){return j("boxShadow")},y.textshadow=function(){return""===b.createElement("div").style.textShadow},y.opacity=function(){return e("opacity:.55"),/^0.55$/.test(t.opacity)},y.cssanimations=function(){return j("animationName")},y.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return d((a+"-webkit- ".split(" ").join(b+a)+u.join(c+a)).slice(0,-a.length)),g(t.backgroundImage,"gradient")},y.csstransforms=function(){return!!j("transform")},y.csstransforms3d=function(){var a=!!j("perspective");return a&&"webkitPerspective"in q.style&&B("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},y.csstransitions=function(){return j("transition")},y.fontface=function(){var a;return B('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&0===g.indexOf(d.split(" ")[0])}),a};for(var E in y)m(y,E)&&(l=E.toLowerCase(),o[l]=y[E](),z.push((o[l]?"":"no-")+l));return o.addTest=function(a,b){if("object"==typeof a)for(var d in a)m(a,d)&&o.addTest(d,a[d]);else{if(a=a.toLowerCase(),o[a]!==c)return o;b="function"==typeof b?b():b,"undefined"!=typeof p&&p&&(q.className+=" "+(b?"":"no-")+a),o[a]=b}return o},d(""),s=k=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function i(a){a||(a=b);var d=e(a);return!s.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||h(a,d),a}var j,k,l="3.7.0",m=a.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,o=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",q=0,r={};!function(){try{var a=b.createElement("a");a.innerHTML="",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),o._version=n,o._prefixes=u,o._domPrefixes=x,o._cssomPrefixes=w,o.hasEvent=C,o.testProp=function(a){return h([a])},o.testAllProps=j,o.testStyles=B,q.className=q.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+z.join(" "):""),o}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;g>c;c++)d=a[c].split("="),(b=B[d.shift()])&&(f=b(f,d));for(c=0;e>c;c++)f=z[c](f);return f}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(A[i.url]?i.noexec=!0:A[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),A[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}),g(a,l,b,0,j);else if(Object(a)===a)for(i in h=function(){var b,c=0;for(b in a)a.hasOwnProperty(b)&&c++;return c}(),a)a.hasOwnProperty(i)&&(!c&&!--h&&(d(l)?l=function(){var a=[].slice.call(arguments);m.apply(this,a),n()}:l[i]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),n()}}(m[i])),g(a[i],l,b,i,j))}else!c&&n()}var h,i,j=!!a.test,k=a.load||a.both,l=a.callback||f,m=l,n=a.complete||f;c(j?a.yep:a.nope,!!k),k&&c(k)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(y(a))for(i=0;i http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/jquery-finger-v0.1.0.min.js !function(a){function b(a,b){return(m?b.originalEvent.touches[0]:b)["page"+a.toUpperCase()]}function c(b,c,d){var g=a.Event(c,t);a.event.trigger(g,{originalEvent:b},b.target),g.isDefaultPrevented()&&b.preventDefault(),d&&(a.event.remove(r,p+"."+q,e),a.event.remove(r,o+"."+q,f))}function d(d){var k=d.timeStamp||+new Date;i!=k&&(i=k,s.x=t.x=b("x",d),s.y=t.y=b("y",d),s.time=k,s.target=d.target,t.orientation=null,g=!1,h=!1,j=setTimeout(function(){h=!0,c(d,"press")},a.Finger.pressDuration),a.event.add(r,p+"."+q,e),a.event.add(r,o+"."+q,f),u.preventDefault&&d.preventDefault())}function e(d){return t.x=b("x",d),t.y=b("y",d),t.dx=t.x-s.x,t.dy=t.y-s.y,t.adx=Math.abs(t.dx),t.ady=Math.abs(t.dy),(g=t.adx>u.motionThreshold||t.ady>u.motionThreshold)?(clearTimeout(j),t.orientation||(t.adx>t.ady?(t.orientation="horizontal",t.direction=t.dx>0?1:-1):(t.orientation="vertical",t.direction=t.dy>0?1:-1)),d.target!==s.target?(d.target=s.target,void f.call(this,a.Event(o+"."+q,d))):void c(d,"drag")):void 0}function f(a){var b,d=a.timeStamp||+new Date,e=d-s.time;if(clearTimeout(j),a.target===s.target){if(g||h)e0?("transform-slide"==i?b.settings.flick_animation="transform-slide":"transition-slide"==i?b.settings.flick_animation="transition-slide":"jquery-slide"==i?b.settings.flick_animation="jquery-slide":"scroller-slide"==i&&(b.settings.flick_animation="scroller-slide"),d.addClass("animate-"+i)):d.addClass("animate-"+b.settings.flick_animation);var j=d.data("theme"),k=d.find(".first-flick").data("theme");j&&j.length>0?(b.settings.theme=j,d.addClass(k&&k.length>0?"flicker-theme-"+k:"flicker-theme-"+j)):d.addClass("flicker-theme-"+b.settings.theme);var l=d.data("block-text");if(void 0!=l&&0==l&&(b.settings.block_text=!1),d.find("li").each(function(){e++,a(this).wrapInner('
'),$flick_block_text=a(this).data("block-text"),void 0!=$flick_block_text?1==$flick_block_text&&(a(this).find(".flick-title").wrapInner(''),a(this).find(".flick-sub-text").wrapInner('')):1==b.settings.block_text&&(a(this).find(".flick-title").wrapInner(''),a(this).find(".flick-sub-text").wrapInner(''));var c=a(this).data("background");c&&c.length>0&&a(this).css("background-image","url("+c+")"),$flick_theme=a(this).data("theme"),$flick_theme&&$flick_theme.length>0&&a(this).addClass("flick-theme-"+$flick_theme)}),"scroller-slide"!=b.settings.flick_animation){$data_arrow_navigation=d.data("arrows"),void 0!=$data_arrow_navigation?0!=$data_arrow_navigation&&b.create_arrow_navigation():1==b.settings.arrows&&b.create_arrow_navigation(),$data_dot_navigation=d.data("dot-navigation"),$data_dot_alignment=d.data("dot-alignment");var m=b.settings.dot_alignment;void 0!=$data_dot_alignment&&("left"==$data_dot_alignment?m="left":"right"==$data_dot_alignment&&(m="right")),void 0!=$data_dot_navigation?0!=$data_dot_navigation&&b.create_dot_navigation(m):1==b.settings.dot_navigation&&b.create_dot_navigation(m),$flick_delay=1e3*b.settings.auto_flick_delay,$data_auto_flick=d.data("auto-flick"),$data_auto_flick_delay=d.data("auto-flick-delay"),$data_auto_flick_delay&&($flick_delay=1e3*$data_auto_flick_delay),void 0!=$data_auto_flick&&(b.settings.auto_flick=0!=$data_auto_flick?!0:!1),b.auto_flick_start(),b.flick_flicker(),"jquery-slide"!=b.settings.flick_animation&&d.find("ul.flicks").bind("transitionend MSTransitionEnd webkitTransitionEnd oTransitionEnd",function(){g=!1})}},b.flick_flicker=function(){Modernizr.touch&&d.on("drag",function(a){0==g&&"horizontal"==a.orientation&&(a.preventDefault(),1==a.direction?(c--,0>c?c=0:(g=!0,b.move_flicker(c))):(c++,c==e?c=e-1:(g=!0,b.move_flicker(c))))})},b.create_arrow_navigation=function(){$arrow_nav_html='
',$arrow_nav_html+='
',d.prepend($arrow_nav_html),a(".arrow-navigation").mouseover(function(){0==a(this).hasClass("hover")&&a(this).addClass("hover")}),a(".arrow-navigation").mouseout(function(){1==a(this).hasClass("hover")&&a(this).removeClass("hover")}),a(".arrow-navigation").on("click",function(){a(this).hasClass("right")?(c++,c==e&&(c=0)):(c--,0>c&&(c=e-1)),b.move_flicker(c)})},b.create_dot_navigation=function(c){for($dot_nav_html='
    ';e>f;)f++,$dot_nav_html+=1==f?'
  • ':'
  • ';$dot_nav_html+="
",d.prepend($dot_nav_html),d.find(".dot-navigation li").on("click",function(){b.move_flicker(a(this).index())})},b.auto_flick_start=function(){1==b.settings.auto_flick&&(b.flicker_auto=setInterval(b.auto_flick,$flick_delay))},b.auto_flick=function(){c++,c==e&&(c=0),b.move_flicker(c)},b.auto_flick_stop=function(){b.flicker_auto=clearInterval(b.flicker_auto)},b.auto_flick_reset=function(){b.auto_flick_stop(),b.auto_flick_start()},b.move_flicker=function(a){c=a,"transform-slide"==b.settings.flick_animation?d.find("ul.flicks").attr({style:"-webkit-transform:translate3d(-"+c+"%, 0, 0);-o-transform:translate3d(-"+c+"%, 0, 0);-moz-transform:translate3d(-"+c+"%, 0, 0);transform:translate3d(-"+c+"%, 0, 0)"}):"transition-slide"==b.settings.flick_animation?d.find("ul.flicks").attr({style:"left:-"+c+"00%;"}):"jquery-slide"==b.settings.flick_animation&&d.find("ul.flicks").animate({left:"-"+c+"00%"},function(){g=!1}),$crt_flick=d.find("ul.flicks li:eq("+c+")"),d.removeClass("flicker-theme-light").removeClass("flicker-theme-dark"),d.addClass($crt_flick.hasClass("flick-theme-dark")?"flicker-theme-dark":$crt_flick.hasClass("flick-theme-light")?"flicker-theme-light":"flicker-theme-"+b.settings.theme),d.find(".dot-navigation .dot.active").removeClass("active"),d.find(".dot:eq("+c+")").addClass("active"),d.attr("data-flick-position",c),b.auto_flick_reset()}};a.fn.flicker=function(c){var d=this.length;return this.each(function(e){var f=a(this),g="flickerplate"+(d>1?"-"+ ++e:""),h=(new b).init(f,c);f.data(g,h).data("key",g)})}}(jQuery); // source --> http://shiobara1200.com/contents/wp-content/themes/CreativePortfolioResFree/js/flickerplate.min.js !function(a){var b=function(){var b=this,c=0,d=!1,e=0,f=0,g=!1;b.settings={arrows:!0,arrows_constraint:!1,auto_flick:!0,auto_flick_delay:10,block_text:!0,dot_navigation:!0,dot_alignment:"center",flick_animation:"transition-slide",flick_position:1,inner_width:!1,theme:"light"},b.init=function(f,h){b.settings=a.extend(b.settings,h),d=f,d.addClass("flickerplate"),d.find("ul:first").addClass("flicks"),d.find("li:first").addClass("first-flick"),c=b.settings.flick_position-1,$data_flick_position=d.data("flick-position"),void 0!=$data_flick_position&&(c=$data_flick_position-1),d.attr("data-flick-position",c);var i=d.data("flick-animation");i&&i.length>0?("transform-slide"==i?b.settings.flick_animation="transform-slide":"transition-slide"==i?b.settings.flick_animation="transition-slide":"jquery-slide"==i?b.settings.flick_animation="jquery-slide":"scroller-slide"==i&&(b.settings.flick_animation="scroller-slide"),d.addClass("animate-"+i)):d.addClass("animate-"+b.settings.flick_animation);var j=d.data("theme"),k=d.find(".first-flick").data("theme");j&&j.length>0?(b.settings.theme=j,d.addClass(k&&k.length>0?"flicker-theme-"+k:"flicker-theme-"+j)):d.addClass("flicker-theme-"+b.settings.theme);var l=d.data("block-text");if(void 0!=l&&0==l&&(b.settings.block_text=!1),d.find("ul.flicks > li").each(function(){e++,a(this).wrapInner('
'),$flick_block_text=a(this).data("block-text"),void 0!=$flick_block_text?1==$flick_block_text&&(a(this).find(".flick-title").wrapInner(''),a(this).find(".flick-sub-text").wrapInner('')):1==b.settings.block_text&&(a(this).find(".flick-title").wrapInner(''),a(this).find(".flick-sub-text").wrapInner(''));var c=a(this).data("background");c&&c.length>0&&a(this).css("background-image","url("+c+")"),$flick_theme=a(this).data("theme"),$flick_theme&&$flick_theme.length>0&&a(this).addClass("flick-theme-"+$flick_theme)}),"scroller-slide"!=b.settings.flick_animation){$data_arrow_navigation=d.data("arrows"),void 0!=$data_arrow_navigation?0!=$data_arrow_navigation&&b.create_arrow_navigation():1==b.settings.arrows&&b.create_arrow_navigation(),$data_dot_navigation=d.data("dot-navigation"),$data_dot_alignment=d.data("dot-alignment");var m=b.settings.dot_alignment;void 0!=$data_dot_alignment&&("left"==$data_dot_alignment?m="left":"right"==$data_dot_alignment&&(m="right")),void 0!=$data_dot_navigation?0!=$data_dot_navigation&&b.create_dot_navigation(m):1==b.settings.dot_navigation&&b.create_dot_navigation(m),$flick_delay=1e3*b.settings.auto_flick_delay,$data_auto_flick=d.data("auto-flick"),$data_auto_flick_delay=d.data("auto-flick-delay"),$data_auto_flick_delay&&($flick_delay=1e3*$data_auto_flick_delay),void 0!=$data_auto_flick&&(b.settings.auto_flick=0!=$data_auto_flick?!0:!1),b.auto_flick_start(),b.flick_flicker(),"jquery-slide"!=b.settings.flick_animation&&d.find("ul.flicks").bind("transitionend MSTransitionEnd webkitTransitionEnd oTransitionEnd",function(){g=!1})}b.move_flicker(c)},b.flick_flicker=function(){Modernizr.touch&&d.on("drag",function(a){0==g&&"horizontal"==a.orientation&&(a.preventDefault(),1==a.direction?(c--,0>c?c=0:(g=!0,b.move_flicker(c))):(c++,c==e?c=e-1:(g=!0,b.move_flicker(c))))})},b.create_arrow_navigation=function(){$arrow_nav_html='
',$arrow_nav_html+='
',d.prepend($arrow_nav_html),a(".arrow-navigation").mouseover(function(){0==a(this).hasClass("hover")&&a(this).addClass("hover")}),a(".arrow-navigation").mouseout(function(){1==a(this).hasClass("hover")&&a(this).removeClass("hover")}),$data_arrows_constraint=d.data("arrows-constraint"),void 0!=$data_arrows_constraint&&(b.settings.arrows_constraint=$data_arrows_constraint),d.find(".arrow-navigation").on("click",function(){a(this).hasClass("right")?(c++,c==e&&(c=0==b.settings.arrows_constraint?0:e-1)):(c--,0>c&&(c=0==b.settings.arrows_constraint?e-1:0)),b.move_flicker(c)})},b.create_dot_navigation=function(c){for($dot_nav_html='
    ';e>f;)f++,$dot_nav_html+=1==f?'
  • ':'
  • ';$dot_nav_html+="
",d.prepend($dot_nav_html),d.find(".dot-navigation li").on("click",function(){b.move_flicker(a(this).index())})},b.auto_flick_start=function(){1==b.settings.auto_flick&&(b.flicker_auto=setInterval(b.auto_flick,$flick_delay))},b.auto_flick=function(){c++,c==e&&(c=0),b.move_flicker(c)},b.auto_flick_stop=function(){b.flicker_auto=clearInterval(b.flicker_auto)},b.auto_flick_reset=function(){b.auto_flick_stop(),b.auto_flick_start()},b.move_flicker=function(a){c=a,"transform-slide"==b.settings.flick_animation?d.find("ul.flicks").attr({style:"-webkit-transform:translate3d(-"+c+"%, 0, 0);-o-transform:translate3d(-"+c+"%, 0, 0);-moz-transform:translate3d(-"+c+"%, 0, 0);transform:translate3d(-"+c+"%, 0, 0)"}):"transition-slide"==b.settings.flick_animation?d.find("ul.flicks").attr({style:"left:-"+c+"00%;"}):"jquery-slide"==b.settings.flick_animation&&d.find("ul.flicks").animate({left:"-"+c+"00%"},function(){g=!1}),$crt_flick=d.find("ul.flicks li:eq("+c+")"),d.removeClass("flicker-theme-light").removeClass("flicker-theme-dark"),d.addClass($crt_flick.hasClass("flick-theme-dark")?"flicker-theme-dark":$crt_flick.hasClass("flick-theme-light")?"flicker-theme-light":"flicker-theme-"+b.settings.theme),d.find(".dot-navigation .dot.active").removeClass("active"),d.find(".dot:eq("+c+")").addClass("active"),d.attr("data-flick-position",c),b.auto_flick_reset()}};a.fn.flicker=function(c){var d=this.length;return this.each(function(e){var f=a(this),g="flickerplate"+(d>1?"-"+ ++e:""),h=(new b).init(f,c);f.data(g,h).data("key",g)})}}(jQuery);